package c.j.a.c.h;

import android.app.Activity;
import android.text.TextUtils;
import c.j.a.a.a.a.i;
import c.j.a.c.q.c;
import c.j.a.c.q.d;
import com.ss.android.downloadlib.activity.TTDelegateActivity;
import java.lang.ref.WeakReference;
import java.util.Map;

/* compiled from: TTDelegateActivity */
public class a implements i {
    public WeakReference<Activity> a;
    public final /* synthetic */ String b;
    public final /* synthetic */ TTDelegateActivity c;

    public a(TTDelegateActivity tTDelegateActivity, String str) {
        this.c = tTDelegateActivity;
        this.b = str;
        this.a = new WeakReference(tTDelegateActivity);
    }

    public void a() {
        String str = this.b;
        Map map = c.a;
        if (!TextUtils.isEmpty(str)) {
            c.j.a.c.q.c.a aVar;
            if (TextUtils.isEmpty(str)) {
                aVar = null;
            } else {
                aVar = (c.j.a.c.q.c.a) c.a.remove(str);
            }
            if (aVar != null) {
                aVar.a();
            }
        }
        d.i((Activity) this.a.get());
    }

    public void a(String str) {
        String str2 = this.b;
        Map map = c.a;
        if (!TextUtils.isEmpty(str2)) {
            c.j.a.c.q.c.a aVar;
            if (TextUtils.isEmpty(str2)) {
                aVar = null;
            } else {
                aVar = (c.j.a.c.q.c.a) c.a.remove(str2);
            }
            if (aVar != null) {
                aVar.a(str);
            }
        }
        d.i((Activity) this.a.get());
    }
}
